package com.suning.app.snpaasadmin.operation;

import java.util.List;

import org.apache.ibatis.session.SqlSession;

import com.suning.app.snpaasadmin.dao.CfServiceBoughtMapper;
import com.suning.app.snpaasadmin.pojo.CfServiceBought;
import com.suning.app.snpaasadmin.pojo.CfServiceBoughtExample;

public class CfServiceBoughtDBOperation {
	public List<CfServiceBought> getCfServiceBoughtList(int envId) {
		SqlSession sqlSession = FactoryBase.getSession().openSession();
		CfServiceBoughtMapper csbMapper = sqlSession.getMapper(CfServiceBoughtMapper.class);
		
		CfServiceBoughtExample csbEx = new CfServiceBoughtExample();
		csbEx.createCriteria().andEnvIdEqualTo(envId);
		List<CfServiceBought> csbList = csbMapper.selectByExample(csbEx);
		
		sqlSession.close();
		return csbList;
	}

}
